<template>
  <el-select :placeholder="placeholder" :value="value" :size="size" @input="change($event)" :clearable="clearable">
    <el-option v-for="option in options" :label="option.label" :value="option.value"></el-option>
  </el-select>
</template>

<script>
export default {
  name: "FormSelect",
  props:{
    placeholder:{
      type:String,
      default:''
    },
    value:{
    },
    clearable:{
      type:Boolean,
      default:true
    },
    size:{
      default: 'medium'
    },
    options:{
      type:Array,
      required:false,
      default:function (){
        let arr = [];
        arr.push({label:'是',value:1})
        arr.push({label:'否',value:0})
        return arr;
      }
    }
  },
  methods: {
    change: function(val) {
      this.$emit('input', val);
    }
  },
}
</script>

<style scoped>

</style>
